#!/bin/bash

echo "................install keepalived and ipvsadm ........."

yum install -y keepalived ipvsadm
ipvsadm --save > /etc/sysconfig/ipvsadm
echo 1 > /proc/sys/net/ipv4/ip_forward
systemctl enable ipvsadm
systemctl start ipvsadm